The disclosed embodiments relate generally to computer-implemented methods and apparatus for performing automatic lock removal from source code.
Many platforms such as distributed file systems and key-value stores use concurrent data structures that may be accessed by multiple devices or threads. Traditionally, the way to implement such data structures has been to use locks. Locks are typically obtained immediately prior to access of concurrent data structures and released immediately after the access of the concurrent data structures. Such access may include writing data to the data structures, as well as reading data from the data structures.
The use of locks ensures integrity of the concurrent data structures. However, these same locks may also lead to bottlenecks. To increase the efficiency of such systems, scalable concurrent data structures may be developed. However, these data structures are time-consuming to implement and are error-prone.